Skip to content

Fix typing contract for max_concurrency in Datalake client#45631

Merged
nateprewitt merged 2 commits intoAzure:mainfrom
nateprewitt:max_concurrency_datalake
Mar 11, 2026
Merged

Fix typing contract for max_concurrency in Datalake client#45631
nateprewitt merged 2 commits intoAzure:mainfrom
nateprewitt:max_concurrency_datalake

Conversation

@nateprewitt
Copy link
Member

Description

This is a continuation of #45598. PR 2/3 fixing typing signatures for the datalake client.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings March 10, 2026 22:35
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the effort to align the runtime behavior of azure-storage-file-datalake with its typing contract by ensuring max_concurrency=None is treated as “use SDK default” instead of raising TypeError, and adds coverage for that behavior.

Changes:

  • Introduces DEFAULT_MAX_CONCURRENCY and applies it when max_concurrency is not provided.
  • Updates shared upload helpers (sync/async) to tolerate max_concurrency=None.
  • Adds sync and async tests covering max_concurrency=None for upload and download, and updates the assets tag.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
sdk/storage/azure-storage-file-datalake/tests/test_file_async.py Adds async tests verifying max_concurrency=None doesn’t error for upload/download.
sdk/storage/azure-storage-file-datalake/tests/test_file.py Adds sync tests verifying max_concurrency=None doesn’t error for upload/download.
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py Defaults max_concurrency to DEFAULT_MAX_CONCURRENCY in async upload paths.
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py Defaults max_concurrency to DEFAULT_MAX_CONCURRENCY in sync upload paths.
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/constants.py Adds DEFAULT_MAX_CONCURRENCY = 1.
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client_helpers.py Normalizes max_concurrency from kwargs when building upload options.
sdk/storage/azure-storage-file-datalake/assets.json Updates recorded test assets tag.

@nateprewitt nateprewitt merged commit fa44dea into Azure:main Mar 11, 2026
20 checks passed
@nateprewitt nateprewitt deleted the max_concurrency_datalake branch March 11, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants